<?php
namespace app\validate;

use think\Validate;

class AdminRoleValidate extends Validate {
    protected $rule = [
        'slug' => 'require|max:50|unique:admin_roles,slug^id',
        'name' => 'require|max:50',
        'menu_ids' => 'array'
    ];

    protected $scene = [
        'update' => ['slug', 'name', 'menu_ids']
    ];
}